#pragma once
#include "stdafx.h"

class BaseDialog;

class CMyFileListMenu : public CWindowWnd, public INotifyUI
{

private:
	CPaintManagerUI m_pm;
public:
	CStdString m_stdString_XMLPath;
	BaseDialog *m_pMainDlg;
public:
	CMyFileListMenu();
	CMyFileListMenu(LPCTSTR pszXMLPath, BaseDialog *pMainDlg);
	virtual ~CMyFileListMenu();
	virtual void Notify(TNotifyUI& msg);
	virtual LPCTSTR GetWindowClassName() const { return _T("MyFileMenu"); }
	virtual LPCTSTR GetWindowClassName();
	virtual CStdString GetSkinFolder();
	virtual CStdString GetSkinFile();
	virtual void OnFinalMessage(HWND hWnd);

	virtual LRESULT OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);

	void Init(HWND hWndParent, POINT ptPos);

	virtual LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
protected:

	// custom message map
	typedef HRESULT(CMyFileListMenu::*CustomMsgHandler)(WPARAM, LPARAM, BOOL&);
	typedef std::map<UINT, CustomMsgHandler> MessageMap;

	virtual MessageMap* InitMessageMap();

	// custom message handler
	HRESULT OnCreate(WPARAM wParam, LPARAM lParam, BOOL& bHandled);

};
